{% extends "layout.html" %}

{% block title %}Phone Edit{% endblock %}


{% block content %}
<ul class="nav nav-tabs custom-tab">
    <li><a href="{{ base_url }}admin/accessory.php" data-toggle="tab"><i class="icon-list"></i><span>Accessory</span></a></li>
    <li><a href="{{base_url}}admin/accessory.php?action=add" data-toggle="tab"><i class="icon-plus"></i><span>Add New Accessory</span></a></li>
    <li class="active"><a href="" data-toggle="tab"><i class="icon-pencil"></i><span>Edit Accessory</span></a></li>
</ul>
<div class="user-form">
    <h2>Edit Accessory</h2>
    <form class="form-horizontal custom-form" method="post" action="accessory.php" enctype="multipart/form-data">
        <input type="hidden" name="action" value="edit"/>
        <input type="hidden" name="edit" value="1"/>
        <input type="hidden" name="acc_id" value="{{ accessory.id }}" />
  <fieldset>
      <div>
          <label for="model">Accessory Name</label>
          <input type="text" name="acc" id="model" class="input-xlarge" placeholder="Accessory Name" value="{{accessory.name}}" />
      </div>   
          
      
      <div>
          <label for="brand">Brand</label>
          <select name="brand" id="brand">
              {% for brand in brandname %}
                {% if accessory.brand_id == brand.id %}
                    <option value="{{brand.id}}" selected="selected">{{brand.name}}</option>
                {% else %}
                    <option value="{{brand.id}}">{{brand.name}}</option>
                {% endif %}
                
              {% endfor %}
          </select>
      </div>
      <div>
          <label for="remark">Remark</label>
          <textarea cols="50" rows="4" class="input-xlarge" name="remark" id="remark">{{accessory.remark}}</textarea>
      </div>
      <button type="submit" class="btn btn-primary" >Update</button>
  </fieldset>
</form>
</div>

{% endblock %}